﻿using System;

namespace MapEditor
{
    public class Edit
    {
        private Map undoMap, redoMap;

        public Edit(Map map)
        {
            undoMap = new Map(map);
        }

        public Map Redo()
        {
            if (redoMap == null) throw new ArgumentNullException("Redo layer is null.");

            return redoMap;
        }

        public Map Undo(Map activeMap)
        {
            redoMap = new Map(activeMap);

            return undoMap;
        }
    }
}
